export const JSON_LIST = {}

export function codeToName(id, type) {
  let name = ''
  JSON_LIST[type].forEach(element => {
    if (element.value == id) {
      name = element.text
    }
  })
  return name
}

export function nameToVal(name, type) {
  let val = ''
  JSON_LIST[type].forEach(element => {
    if (element.text == name) {
      val = element.value
    }
  })
  return val
}
